function [reading] = readACC(sensor)
    
    tic;
    i=0;
  %  fprintf(sensor.s,'R');  %% send 'R' to arduino and it starts loop
 %   reading = fscanf(sensor.s,'%u');
    %figure(1);
    while toc<8
        i = i+1;
        time(i) = toc;
        fprintf(sensor.s,'R');  %% send 'R' to arduino and it starts loop
        reading(i) = fscanf(sensor.s,'%f'); %% read what arduino sends
        figure(1);
        plot(time,reading);
       % pause(0.25);
    end
end